BIN=process
CC=gcc
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
LFLAGS=-o
CFLAGS=-c
RM=rm -f

$(BIN):$(OBJ)
	@$(CC) $(LFLAGS) $@ $^
	@echo "链接$^成为$@"
%.o:%.c
	@$(CC) $(CFLAGS) $<
	@echo "编译$<成为$@"
.PHONY:clean
clean:
	$(RM) $(BIN) $(OBJ)

.PHONY:print
print:
	@echo $(SRC)
